home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / U.S. System⁄HyperCard / HyperCard—US 1.2.5 / HyperCard Ideas-US 1.2.5 / Idea Stacks / Stack Ideas / background_55552.txt < prev    next >
Encoding:
Text File  |  1988-11-07  |  9.2 KB  |  432 lines

  1. -- background: 55552 from stack: in
  2. -- bmap block id: 37956
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on newStack
  8.   extend
  9. end newStack
  10.  
  11. on extend
  12.   -- type "extend" into the message box and press return to make
  13.   -- three months worth of new cards.
  14.   if the name of this stack contains "stack ideas"
  15.   then
  16.   answer "Please make a new stack before extending it." with "OK"
  17. else
  18.   answer "Make three months more of new cards?" with "OK" or "Cancel"
  19.   if it is "Cancel" then exit extend
  20.   go to last card of this background
  21.   put getStartDate() into start      --what date to begin on
  22.   if start is "Cancel" then exit extend
  23.   put 60*60*24 into OneDay      --seconds in a day
  24.   repeat with cnt = 1 to (365 div 4)   --three months
  25.     put start into it        --a copy
  26.     convert it to long date
  27.     put it into field "Date"
  28.     add OneDay to start
  29.     doMenu New Card
  30.   end repeat
  31.   convert start to long date     --fix the last card
  32.   put start into field "Date"
  33. end if
  34. end extend
  35.  
  36. function getStartDate
  37. -- end of stack or today, whichever is newer
  38. get field "Date"
  39. if it is empty then put the short date into it
  40. convert it to seconds    --so we can compare
  41. put the short date into today
  42. convert today to seconds
  43. if today < 2587766400 then
  44.   answer "Set the Control Panel to today's date" with "OK"
  45.   return "Cancel"
  46. end if
  47. if it >= today then return it   --calendar already beyond today
  48. convert it to short date
  49. answer "Start from which date?" with it or the short date or "Cancel"
  50. if it is "Cancel" then return it
  51. convert it to seconds
  52. return it
  53. end getStartDate
  54.  
  55. on openBackground
  56.   push recent card
  57. end openBackground
  58.  
  59.  
  60. -- part 1 (button)
  61. -- low flags: 00
  62. -- high flags: 0000
  63. -- rect: left=349 top=35 right=58 bottom=377
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 10610 / 10610
  66. -- text alignment: 1
  67. -- font id: 0
  68. -- text size: 12
  69. -- style flags: 0
  70. -- line height: 16
  71. -- part name: dial phone
  72. ----- HyperTalk script -----
  73. on mouseUp
  74.   get the selection
  75.   if it is empty then get the message
  76.   if it is empty then ask "Dial what number?"
  77.   if it is not empty then
  78.     push this card
  79.     visual effect zoom open
  80.     go to stack "Phone"
  81.     dial it
  82.     pop card
  83.   end if
  84. end mouseUp
  85.  
  86.  
  87.  
  88. -- part 2 (button)
  89. -- low flags: 00
  90. -- high flags: 0000
  91. -- rect: left=381 top=35 right=58 bottom=413
  92. -- title width / last selected line: 0
  93. -- icon id / first selected line: 3430 / 3430
  94. -- text alignment: 1
  95. -- font id: 0
  96. -- text size: 12
  97. -- style flags: 0
  98. -- line height: 16
  99. -- part name: Address
  100. ----- HyperTalk script -----
  101. on mouseUp
  102.   get the selection
  103.   visual effect zoom open
  104.   go to "Address"
  105.   if it is not empty then find it
  106. end mouseUp
  107.  
  108.  
  109.  
  110. -- part 3 (button)
  111. -- low flags: 00
  112. -- high flags: 0000
  113. -- rect: left=453 top=35 right=58 bottom=483
  114. -- title width / last selected line: 0
  115. -- icon id / first selected line: 15972 / 15972
  116. -- text alignment: 1
  117. -- font id: 0
  118. -- text size: 12
  119. -- style flags: 0
  120. -- line height: 16
  121. -- part name: go to calendar
  122. ----- HyperTalk script -----
  123. on mouseUp
  124.   get the seconds
  125.   convert it to dateItems
  126.   put ((item 1 of it) - 1987) *2 into whichSix
  127.   if item 2 of it > 6 then add 1 to whichSix
  128.   visual effect zoom open
  129.   if whichSix < 1 then go card 1 of stack "Datebook"
  130.   else if whichSix > 5 then go card 5 of stack "Datebook"
  131.   else
  132.     go to card whichSix of stack "Datebook"
  133.     send "bracketWeek" && the seconds to this card
  134.   end if
  135. end mouseUp
  136.  
  137.  
  138.  
  139. -- part 4 (button)
  140. -- low flags: 00
  141. -- high flags: 0000
  142. -- rect: left=418 top=35 right=58 bottom=448
  143. -- title width / last selected line: 0
  144. -- icon id / first selected line: 4432 / 4432
  145. -- text alignment: 1
  146. -- font id: 0
  147. -- text size: 12
  148. -- style flags: 0
  149. -- line height: 16
  150. -- part name: go to To Do
  151. ----- HyperTalk script -----
  152. on mouseUp
  153.   go to card "First Do" of "Datebook"
  154. end mouseUp
  155.  
  156.  
  157.  
  158. -- part 5 (field)
  159. -- low flags: 00
  160. -- high flags: 0000
  161. -- rect: left=28 top=62 right=82 bottom=232
  162. -- title width / last selected line: 0
  163. -- icon id / first selected line: 0 / 0
  164. -- text alignment: 0
  165. -- font id: 2
  166. -- text size: 12
  167. -- style flags: 0
  168. -- line height: 16
  169. -- part name: Date
  170.  
  171.  
  172. -- part 6 (field)
  173. -- low flags: 00
  174. -- high flags: 4000
  175. -- rect: left=63 top=90 right=128 bottom=236
  176. -- title width / last selected line: 0
  177. -- icon id / first selected line: 0 / 0
  178. -- text alignment: 0
  179. -- font id: 3
  180. -- text size: 9
  181. -- style flags: 0
  182. -- line height: 12
  183. -- part name: 
  184.  
  185.  
  186. -- part 7 (field)
  187. -- low flags: 00
  188. -- high flags: 4000
  189. -- rect: left=63 top=126 right=164 bottom=236
  190. -- title width / last selected line: 0
  191. -- icon id / first selected line: 0 / 0
  192. -- text alignment: 0
  193. -- font id: 3
  194. -- text size: 9
  195. -- style flags: 0
  196. -- line height: 12
  197. -- part name: 
  198.  
  199.  
  200. -- part 8 (field)
  201. -- low flags: 00
  202. -- high flags: 4000
  203. -- rect: left=63 top=162 right=200 bottom=236
  204. -- title width / last selected line: 0
  205. -- icon id / first selected line: 0 / 0
  206. -- text alignment: 0
  207. -- font id: 3
  208. -- text size: 9
  209. -- style flags: 0
  210. -- line height: 12
  211. -- part name: 
  212.  
  213.  
  214. -- part 9 (field)
  215. -- low flags: 00
  216. -- high flags: 4000
  217. -- rect: left=63 top=198 right=236 bottom=236
  218. -- title width / last selected line: 0
  219. -- icon id / first selected line: 0 / 0
  220. -- text alignment: 0
  221. -- font id: 3
  222. -- text size: 9
  223. -- style flags: 0
  224. -- line height: 12
  225. -- part name: 
  226.  
  227.  
  228. -- part 10 (field)
  229. -- low flags: 00
  230. -- high flags: 4000
  231. -- rect: left=63 top=234 right=272 bottom=236
  232. -- title width / last selected line: 0
  233. -- icon id / first selected line: 0 / 0
  234. -- text alignment: 0
  235. -- font id: 3
  236. -- text size: 9
  237. -- style flags: 0
  238. -- line height: 12
  239. -- part name: 
  240.  
  241.  
  242. -- part 11 (field)
  243. -- low flags: 00
  244. -- high flags: 4000
  245. -- rect: left=63 top=270 right=308 bottom=236
  246. -- title width / last selected line: 0
  247. -- icon id / first selected line: 0 / 0
  248. -- text alignment: 0
  249. -- font id: 3
  250. -- text size: 9
  251. -- style flags: 0
  252. -- line height: 12
  253. -- part name: 
  254.  
  255.  
  256. -- part 12 (field)
  257. -- low flags: 00
  258. -- high flags: 4000
  259. -- rect: left=306 top=59 right=97 bottom=479
  260. -- title width / last selected line: 0
  261. -- icon id / first selected line: 0 / 0
  262. -- text alignment: 0
  263. -- font id: 3
  264. -- text size: 9
  265. -- style flags: 0
  266. -- line height: 12
  267. -- part name: 
  268.  
  269.  
  270. -- part 13 (field)
  271. -- low flags: 00
  272. -- high flags: 4000
  273. -- rect: left=306 top=95 right=133 bottom=479
  274. -- title width / last selected line: 0
  275. -- icon id / first selected line: 0 / 0
  276. -- text alignment: 0
  277. -- font id: 3
  278. -- text size: 9
  279. -- style flags: 0
  280. -- line height: 12
  281. -- part name: 
  282.  
  283.  
  284. -- part 14 (field)
  285. -- low flags: 00
  286. -- high flags: 4000
  287. -- rect: left=306 top=131 right=169 bottom=479
  288. -- title width / last selected line: 0
  289. -- icon id / first selected line: 0 / 0
  290. -- text alignment: 0
  291. -- font id: 3
  292. -- text size: 9
  293. -- style flags: 0
  294. -- line height: 12
  295. -- part name: 
  296.  
  297.  
  298. -- part 15 (field)
  299. -- low flags: 00
  300. -- high flags: 4000
  301. -- rect: left=306 top=167 right=205 bottom=479
  302. -- title width / last selected line: 0
  303. -- icon id / first selected line: 0 / 0
  304. -- text alignment: 0
  305. -- font id: 3
  306. -- text size: 9
  307. -- style flags: 0
  308. -- line height: 12
  309. -- part name: 
  310.  
  311.  
  312. -- part 16 (field)
  313. -- low flags: 00
  314. -- high flags: 4000
  315. -- rect: left=306 top=203 right=241 bottom=479
  316. -- title width / last selected line: 0
  317. -- icon id / first selected line: 0 / 0
  318. -- text alignment: 0
  319. -- font id: 3
  320. -- text size: 9
  321. -- style flags: 0
  322. -- line height: 12
  323. -- part name: 
  324.  
  325.  
  326. -- part 17 (field)
  327. -- low flags: 00
  328. -- high flags: 4000
  329. -- rect: left=306 top=239 right=277 bottom=479
  330. -- title width / last selected line: 0
  331. -- icon id / first selected line: 0 / 0
  332. -- text alignment: 0
  333. -- font id: 3
  334. -- text size: 9
  335. -- style flags: 0
  336. -- line height: 12
  337. -- part name: 
  338.  
  339.  
  340. -- part 18 (field)
  341. -- low flags: 00
  342. -- high flags: 4000
  343. -- rect: left=306 top=275 right=313 bottom=479
  344. -- title width / last selected line: 0
  345. -- icon id / first selected line: 0 / 0
  346. -- text alignment: 0
  347. -- font id: 3
  348. -- text size: 9
  349. -- style flags: 0
  350. -- line height: 12
  351. -- part name: 
  352.  
  353.  
  354. -- part 21 (button)
  355. -- low flags: 00
  356. -- high flags: 0000
  357. -- rect: left=209 top=304 right=329 bottom=236
  358. -- title width / last selected line: 0
  359. -- icon id / first selected line: 1014 / 1014
  360. -- text alignment: 1
  361. -- font id: 0
  362. -- text size: 12
  363. -- style flags: 0
  364. -- line height: 16
  365. -- part name: Prev
  366. ----- HyperTalk script -----
  367. on mouseUp
  368.   visual effect wipe right
  369.   go to previous card
  370. end mouseUp
  371.  
  372.  
  373.  
  374. -- part 22 (button)
  375. -- low flags: 00
  376. -- high flags: 0000
  377. -- rect: left=276 top=303 right=329 bottom=303
  378. -- title width / last selected line: 0
  379. -- icon id / first selected line: 1013 / 1013
  380. -- text alignment: 1
  381. -- font id: 0
  382. -- text size: 12
  383. -- style flags: 0
  384. -- line height: 16
  385. -- part name: Next
  386. ----- HyperTalk script -----
  387. on mouseUp
  388.   visual effect wipe left
  389.   go to next card
  390. end mouseUp
  391.  
  392.  
  393.  
  394. -- part 23 (button)
  395. -- low flags: 00
  396. -- high flags: 0000
  397. -- rect: left=449 top=303 right=331 bottom=486
  398. -- title width / last selected line: 0
  399. -- icon id / first selected line: 1012 / 1012
  400. -- text alignment: 1
  401. -- font id: 0
  402. -- text size: 12
  403. -- style flags: 0
  404. -- line height: 16
  405. -- part name: Return
  406. ----- HyperTalk script -----
  407. on mouseUp
  408.   visual effect iris close
  409.   pop card
  410. end mouseUp
  411.  
  412.  
  413.  
  414. -- part 24 (button)
  415. -- low flags: 00
  416. -- high flags: 0000
  417. -- rect: left=315 top=32 right=61 bottom=347
  418. -- title width / last selected line: 0
  419. -- icon id / first selected line: 21700 / 21700
  420. -- text alignment: 1
  421. -- font id: 0
  422. -- text size: 12
  423. -- style flags: 0
  424. -- line height: 16
  425. -- part name: Home
  426. ----- HyperTalk script -----
  427. on mouseUp
  428.   visual effect iris open
  429.   go Home
  430. end mouseUp
  431.  
  432.